package cn.spike.basic.query;

import lombok.Data;

/**
 * 工具类：封装分页功能信息
 * @author:sea
 * @create:2023-01-09 11:34
 */
@Data
public class BaseQuery {
    //当前页
    private Integer currentPage = 1;
    //每页显示数据条数
    private Integer pageSize = 5;

    //高级查询的关键字 - 参数
    private String keyword;


    //获得分页和高级查询的起始下标
    public Integer getBegin(){
        return (this.currentPage-1)*this.pageSize;
    }
}
